<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>项目列表</title>
    <?php require 'templates/common/head.html'; ?>
    <style type="text/css">
       .form_d{
           width:60%;
           margin: 20px auto;
       }
    </style>
</head>
<body>

<!-- 配置文件 -->
<script type="text/javascript" src="../business/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="../business/ueditor/ueditor.all.min.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('container', {
        toolbars: [
            ['fullscreen', 'source', '|', 'undo', 'redo', '|',
                'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'pasteplain', '|', 'forecolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
                'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
                'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
                'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'link', 'unlink', 'anchor', '|',
                'simpleupload', 'emotion']
        ],
        autoHeightEnabled: true,
        autoFloatEnabled: true
    });
</script>

<div class="container-fluid">
    <?php require 'templates/common/nav.html'; ?>
    <div class="panel panel-primary">
        <div class="panel-heading text-center">
            <h3 class="panel-title"><?php if(isset($case))echo "编辑";else echo "添加";?>病例文章</h3>
        </div>

        <div class="form_d">
            <form action="" method="post">
                昵称:<input type="text" name="name" id="namese" style="width: 75%" >
                <input type="button" onclick="selectshow()" name="select" value="搜索用户">
            </form>
        </div>

        <form action="index.php?m=case_manage&a=release_case_post" method="post">
            <input type="hidden" name="id" value="<?=$case['id']?>" />
            <div class="form_d"><span style="width: 180px">用   户:</span>
                <div id="xianshi">
                    <?php  if($doctor):?>
                    <input type="radio" checked="checked" value="<?=$doctor['用户id']?>" name="专家id">
                    <?=$doctor['name']?>（<?=$doctor['医院']?>）
                    <?php  endif;?>
                </div>
            </div>
            <div class="form_d">
                <span>病例标题:</span>
                <input style="width: 80%;" type="text" name="title" placeholder="请填写标题，必填项" value="<?=@$case['title']?>" >
            </div>
            <div class="form_d">
                <span>病例标题关键词:</span>
                <input style="width: 75%;" type="text" name="keyWords"  placeholder="病历关键词（多个关键词请用英文逗号隔开）" value="<?=@$case['keyWords']?>" >
            </div>
            <div class="form_d">
                <span>内容:</span><!-- 加载编辑器的容器 -->
                <textarea style="height: 500px;" id="container" name="content" type="text/plain"><?=@$case['detail']?></textarea>
            </div>
            <div class="form_d">
                <input id="tijiao" type="submit" name="okn" value="提交">
            </div>
        </form>
    </div>

</div>
<script src="../business/resource/js/jquery-1.11.1.min.js"></script>
<script language="JavaScript">
    function selectshow(){
        var name= document.getElementById("namese").value;
        $.post('index.php?m=video_course&a=find_user',{name:name},function(data) {
            document.getElementById('xianshi').innerHTML='';
            document.getElementById("xianshi").innerHTML=data;

        });

    }
$(function(){
    $("#end").click(function(){
        $(this).attr('hidden',true);
    });
    $("#tijiao").click(function(){
        $(this).attr('hidden',true);
    });
})

</script>
<?php require 'templates/common/foot.html'; ?>
</body>
</html>

